<template>
  <view class="page_content">
    <view class="page_title">
      <view class="title_text">填写商户资料</view>
      <view class="title_step">
        <text class="now_step">2</text>/3
      </view>
    </view>
    <view class="type_line">主体类型：个体工商户
      <text class="text_btn">修改</text>
    </view>
    <view class="form_box">
      <view class="form_item" @tap="goto('storePhoto')">
        <view class="item_title">门店照片</view>
        <view class="item_value">
          <view class="status_box">
            <text>已完成</text>
            <text class="iconfont iconqianjin icon_size"></text>
          </view>
        </view>
      </view>
      <view class="form_item" @tap="goto('storeLicense')">
        <view class="item_title">营业执照</view>
        <view class="item_value">
          <view class="status_box">
            <text class="status_cmp">待填写</text>
            <text class="iconfont iconqianjin icon_size"></text>
          </view>
        </view>
      </view>
      <view class="form_item">
        <view class="item_title">经营者身份证</view>
        <view class="item_value">
          <view class="status_box">
            <text>已完成</text>
            <text class="iconfont iconqianjin icon_size"></text>
          </view>
        </view>
      </view>
      <view class="form_item">
        <view class="item_title">银行卡结算信息</view>
        <view class="item_value">
          <view class="status_box">
            <text class="status_cmp">待填写</text>
            <text class="iconfont iconqianjin icon_size"></text>
          </view>
        </view>
      </view>
    </view>
    <view class="submit_button" @tap="next()">下一步</view>
  </view>
</template>
<script>
import Taro from '@tarojs/taro'
import './user.scss'
export default {
  data(){
    return{
      userName: "",
      wxNumber: "",
      mobile: "",
      verify_code: "",
      code_status: 1,
      code_second: 60
    }
  },
  methods: {
    inputName(val){
      this.username = val;
    },
    inputWX(val){
      this.wxNumber = val;
    },
    inputMobile(val) {
      this.mobile = val;
    },
    inputVerify(val) {
      this.verify_code = val;
    },
    sendCode(){
      this.code_status = 2;
      this.setSecond()
    },
    setSecond(){
      if(this.code_second == 0){
        this.code_second = 60;
        this.code_status = 1;
      }else{
        setTimeout(() => {
          this.code_second--;
          this.setSecond();
        }, 1000);
      }
    },
    next(){
      Taro.navigateTo({url:"success"})
    },
    goto(path){
      Taro.navigateTo({
        url: path
      })
    }
  } 
}
</script>